package com.action;

import com.service.WxLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/weixin/")
@CrossOrigin("*")
public class WxAction {

    @Autowired
    private WxLoginService wxLoginService;

    @RequestMapping("/wxLogin")
    public String wxLogin(String code,String nick,String head,String miwen, String iv)
    {
        String result = wxLoginService.wxLogin(code,nick,head,miwen,iv);
        System.out.println(result);
        return result;
    }
}
